/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package views;

import java.util.Date;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JFrame;

/**
 *
 * @author chulian
 */
public class Mythread extends Thread{
 JFrame theWindow;
 
    public Mythread(JFrame theWindow){
    this.theWindow=theWindow;
    }
    public void run(){
        while(true){
            try {
                Date myDate = new Date();
                String tit="LP2 - TRAMARSA                                                                               ";
                theWindow.setTitle(tit+myDate.toString());
                this.sleep(50);
            } catch (InterruptedException ex) {
                Logger.getLogger(Mythread.class.getName()).log(Level.SEVERE, null, ex);
            }
           
        }
    }
}
